﻿<div class="form-horizontal" ms-controller="GZRZADD">
    <div class="form-group">
        <label class="col-xs-2 control-label">日报类型</label>
        <div class="col-xs-4">
            <select class="form-control" ms-duplex="modelData.Remark">
                <option ms-repeat-item="ColumnData" ms-attr-val="item.TypeNO" ms-attr-selected="item.TypeNO==modelData.Remark?'selected':''">{{item.TypeNO}}</option>
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-2 control-label">日报填写时间</label>
        <div class="col-xs-4">
            <input type="text" class="form-control szhl_form_date  szhl_require" id="inputEmail3" ms-duplex="modelData.RBDate">
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-2 control-label">日报内容</label>
        <div class="col-xs-9">
            <textarea id="conContent" class="span2  szhl_UEEDIT form-control szhl_require" ms-duplex="modelData.RBContent"></textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-2 control-label">完成情况</label>
        <div class="col-xs-9">
            <textarea class="span2  szhl_UEEDIT form-control " ms-duplex="modelData.RBWCQK"></textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-2 control-label">附件</label>
        <div class="col-xs-9">
            <input type="text" value="" class="span2  szhl_Upload form-control" ms-duplex="modelData.Files" />
        </div>
    </div>
</div>
<script>

    var strId = ComFunJS.getQueryString("ID");
    var model = avalon.define({
        $id: "GZRZADD",
        ColumnData: [],
        modelData: { "RBDate": "", "RBContent": "", "Remark": "", "RBWCQK": "", "Files": "" }
    });
    function getdata() {
        var modelValue = JSON.stringify(model.modelData.$model);
        return { Action: "ADDGZRZ", P1: modelValue };
    }
    avalon.ready(function () {
        $.getJSON('/API/FTAPI.ashx?Action=GETCOLUMNLIST', { P1: 7 }, function (resultData) {
            if (resultData.ErrorMsg == "") {
                model.ColumnData = resultData.Result;
                if (strId == null) {
                    model.modelData.Remark = resultData.Result[0].TypeNO;
                }
            }
        })
        if (strId != null) {
            $.getJSON('/API/FTAPI.ashx?Action=GETGZRZMODEL', { P1: strId }, function (resultData) {
                if (resultData.ErrorMsg == "") {
                    model.modelData = resultData.Result;
                }
            })
        }
    })
</script>